<?php
/*
 * Created on 22.12.2005
 *
 * Sync token param is not multi frame save.
 * 
 * attrs:
 * 	name: makes token multi frame save
 */

class xt_synctokenparamHandler 
{

    function startElement (& $sender, $attrs)
    {
        $parent = $sender->topParent();
        if ($parent['tag'] != 'url')
            die ("Parent of param must be url and must have attribute var\n");
        $name = '';
        if (!empty($attrs['name']))
        	$name = $attrs['name'];
        $sender->appendCode('$__'."url->addParam(\$actionform->syncTokenName(".$name."), \$actionform->syncToken(".$name."));\n");        
    }
    
    function endElement (& $sender)
    {
    }

}

?>
